<script lang="ts" setup>
import { reactive } from "vue"

const props = defineProps({
  title: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: "#79828f"
  },
  background: {
    type: String,
    default: "#f7f8fb"
  }
})
const spanStyle = reactive({
  borderColor: props.color,
  color: props.color
})
const circleStyle = reactive({
  backgroundColor: props.color
})
</script>
<template>
  <div class="title" :style="spanStyle">
    <div class="circle" :style="circleStyle" />
    <span class="status">{{ props.title }}</span>
  </div>
</template>
<style lang="scss" scoped>
.title {
  // width: 74px;
  text-align: center;
  height: 22px;
  padding: 0 8px;
  color: #79828f;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 12px;
  margin: 0 auto;
  .circle {
    width: 7px;
    height: 7px;
    background: #79828f;
    border-radius: 50%;
    margin-right: 4px;
    margin-bottom: 1px;
  }
  .status {
    display: inline-block;
    text-align: center;
  }
}
</style>
